Processing
the MM_WOM_DONE Message
The following
example shows how to process the MM_WOM_DONE
// WndProc--Main window procedure.
LRESULT FAR PASCAL WndProc(HWND hWnd, UINT msg,
WPARAM wParam,
LPARAM
lParam)
{
switch (msg)
{
case
MM_WOM_DONE:
// A
waveform-audio data block has been played and
// can now
be freed.
waveOutUnprepareHeader((HWAVEOUT) wParam,
(LPWAVEHDR) lParam, sizeof(WAVEHDR) );
// Free hData
memory.
waveOutClose((HWAVEOUT) wParam);
break;
}
return
DefWindowProc(hWnd, msg, wParam, lParam);
}